class: center, middle, inverse, title-slide .title[ # Forecasting Large-Scale Time Series ] .author[ ### Thiyanga S. Talagala ] .date[ ### Organized by Forecasting for Social Good (F4SG) - an official section of the International Institute of Forecasters ] --- <style> .center2 { margin: 0; position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } </style> <style type="text/css"> .remark-slide-content { font-size: 30px; } </style> ### Content - Time series features - Feature-based time series forecasting - Introduction to tsfeatures package - Introduction to seer package - feasts: *F*eature *E*xtraction *A*nd *S*tatistics for *T*ime *S*eries - What did we learn? - Where to go from here? --- class: center, middle background-image: url(imgwhyr/shopping.jpg) background-size: contain class: center, top, inverse --- background-image: url(imgwhyr/bananas.jpg) class: center, top, inverse --- ## Sales data .pull-left[ Data from June, 2011 to November, 2021 ``` # A tsibble: 126 x 2 [1M] Time Sales <mth> <dbl> 1 2011 Jun 2317 2 2011 Jul 2265 3 2011 Aug 2842 4 2011 Sep 2485 5 2011 Oct 2904 6 2011 Nov 2782. 7 2011 Dec 2587 8 2012 Jan 2734. 9 2012 Feb 2390. 10 2012 Mar 2657 # … with 116 more rows ``` ] .pull-right[ <!-- --> ] --- ## Sales data .pull-left[ Data from June, 2011 to November, 2021 ``` # A tsibble: 126 x 2 [1M] Time Sales <mth> <dbl> 1 2011 Jun 2317 2 2011 Jul 2265 3 2011 Aug 2842 4 2011 Sep 2485 5 2011 Oct 2904 6 2011 Nov 2782. 7 2011 Dec 2587 8 2012 Jan 2734. 9 2012 Feb 2390. 10 2012 Mar 2657 # … with 116 more rows ``` ] .pull-right[ <!-- --> ] --- ## Sales data .pull-left[ <!-- --> ] -- .pull-right[ - **How much** will you sell over the next 12 months? - **How much** do we need to produce and **when**? ] --- ### What might happen during a typical model building process? <!-- --> --- ### What might happen during a typical model building process? <!-- --> --- ### What might happen during a typical model building process? <!-- --> --- ### What might happen during a typical model building process? <!-- --> --- ### What might happen during a typical model building process? <!-- --> --- ### What might happen during a typical model building process? <!-- --> --- background-image: url(img/supermarket.jpg) class: center, top, inverse --- background-image: url(img/supermarket.jpg) class: center, top, inverse .full-width[.content-box-blue[Multiple products]] --- background-image: url(img/globe.jpg) class: center, top, inverse .full-width[.content-box-blue[Multiple products across many warehouses]] --- ## Number of series: 1 <!-- --> --- ## Number of series: 2 <!-- --> --- ## Number of series: 3 <!-- --> --- ## Number of series: 10 <!-- --> --- ## Number of series: More than 100 <!-- --> --- class: center, middle, inverse #How to forecast large number of univariate time series? --- background-image: url(img/jhu.png) background-size: contain --- class: inverse, center, middle background-image: url(img/jhu.png) background-position: 50% 60%1 background-size: contain
Let's visualize the coronavirus pandemic!
--- background-image: url(img/coronavirus.png) background-size: 90px background-position: 100% 6% # Data: coronavirus package ```r install.packages("coronavirus") # devtools::install_github("RamiKrispin/coronavirus") ``` ```r library(coronavirus) head(coronavirus, 8) ``` ``` date province country lat long type cases uid iso2 iso3 1 2020-01-22 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN 2 2020-01-23 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN 3 2020-01-24 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN 4 2020-01-25 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN 5 2020-01-26 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN 6 2020-01-27 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN 7 2020-01-28 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN 8 2020-01-29 Alberta Canada 53.9333 -116.5765 confirmed 0 12401 CA CAN code3 combined_key population continent_name continent_code 1 124 Alberta, Canada 4413146 North America NA 2 124 Alberta, Canada 4413146 North America NA 3 124 Alberta, Canada 4413146 North America NA 4 124 Alberta, Canada 4413146 North America NA 5 124 Alberta, Canada 4413146 North America NA 6 124 Alberta, Canada 4413146 North America NA 7 124 Alberta, Canada 4413146 North America NA 8 124 Alberta, Canada 4413146 North America NA ``` ---